package com.kongwg.team.junit;

import org.junit.Test;

import com.kongwg.team.domain.Employee;
import com.kongwg.team.service.NameListService;
import com.kongwg.team.service.TeamException;

public class EmployeeTest {
	@Test
	public void TestNameListService(){
		NameListService test = new NameListService();
		Employee[] employees = test.getAllEmployee();
		for(int i = 0;i < employees.length;i++){
			System.out.println(employees[i]);
		}
	}
	@Test
	public void testGetEmployee(){
		NameListService test = new NameListService();
		int i = 2;
		
		try {
			Employee employee = test.getEmployee(i);
			System.out.println(employee);
		} catch (TeamException e) {
		
			System.out.println(e.getMessage());
		}
		
	}
}


